<template>
  <div>
    <i class="el-icon-folder-checked"></i>
    <span class="str">我的收藏</span>
    <hr />
    <ul class="ul_store" >
        <li class="li_store" v-for="(item, index) in list" :key="index"
            >
              <img
                :src="`http://101.132.181.9/api/${item.product_picture}`"
                alt=""
                class="tel_img"
                
              />
              <p class="s1">{{ item.product_name }}</p>
              <p class="s1">{{ item.product_title }}</p>
              <span class="s1" style="color: red"
                >{{ item.product_price }}元</span>

            </li>
    </ul>
  </div>
</template>
<script>
import {collcetion} from "../../utils/api";
export default {
  data() {
    return {
      list: [], //收藏列表
    };
  },

  mounted() {
    this.getlist();
  },
  methods: {
    async getlist() {
      var userid = localStorage.getItem("userid");
      var res = await collcetion(userid);
      console.log("收藏列表", res);
      this.list = res.data.collectList;
    },
  },
};
</script>
<style lang="scss">
.el-icon-folder-checked {
  font-size: 30px;
  color: orange;
  font-weight: 700;
}
.str {
  font-size: 40px;
  font-weight: 600;
}
.ul_store {
  width: 100%;
  display: flex;
  flex-direction: row;
  margin-left:50px ;
  flex-wrap: wrap;
  background: rgb(250, 245, 245);
  text-align: center;
}
.li_store {
   width: 18%;
  height: 280px;
  margin-top: 10px;
  margin-right: 8px;
  background: white;
  margin-left: 10px;
}

.li_store:hover{
    transform: scale(1.01);
  transition: all 0.3s linear;
  box-shadow: 0 0 20px #b0b0b0;
}
</style>